<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>班级管理系统V1.0</title>
<link rel="stylesheet" href="jslib/jquery-easyui-1.3.4/themes/default/easyui.css" type="text/css"></link>
<link rel="stylesheet" href="css/mystyle.css" type="text/css"></link>
<link rel="stylesheet" href="jslib/jquery-easyui-1.3.4/themes/icon.css" type="text/css"></link>
<script type="text/javascript" src="jslib/jquery-easyui-1.3.4/jquery.min.js"></script>
<script type="text/javascript" src="jslib/jquery-easyui-1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript">
	$(function() {
		$('#login_loginForm').form({
		    url : '${pageContext.request.contextPath}/loginAction!login.action',
		    success:function(r){
		    	var obj = jQuery.parseJSON(r);
		    	if(obj.success){
		    		window.location.href="${pageContext.request.contextPath}/index.jsp";
		    	}
		    	$.messager.show({
		    		title:'提示',
		    		msg:obj.msg
		    	});
		    }
		});
	});
	
	function doLogin(){
		$('#login_loginForm').submit();
	}
</script>
</head>
<body style="background: url('images/bg.jpg');">
	<div style="height:200px;"></div>
	<div id="p" style="margin:auto;padding:auto;border:solid black 1px; height:200px;width:400px;background: url('images/bg3.jpg') repeat-x;">
		<div style="padding:40px;">
			<form id="login_loginForm" method="post">
				<table>
					<tr>
						<td style="text-align: right;">用户名：</td>
						<td><input name="userName" value="admin" class="easyui-validatebox" data-options="required:true,missingMessage:'登录名必填！'" style="height:20px;width:180px;margin:5px 0;" />
						</td>
					</tr>
					<tr>
						<td style="text-align: right;">密码：</td>
						<td><input name="password" type="password" class="easyui-validatebox" data-options="required:true,missingMessage:'密码必填！'" style="height:20px;width:180px;margin:5px 0;" />
						</td>
					</tr>
					<tr>
						<td style="text-align: right;">&nbsp;</td>
						<td style="text-align: right;">忘记密码&nbsp;&nbsp;
						<a href="javascript:void(0)" class="easyui-linkbutton" onclick="doLogin()">登录</a>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</body>
</html>